package p270jp.pxv.android.viewholder;

import android.view.ViewGroup;
import p270jp.pxv.android.view.SegmentedLayout;
import p521th.FlexibleItemAdapterSolidItem;
import p521th.SolidItemViewHolder;

/* renamed from: jp.pxv.android.viewholder.IllustAndMangaAndNovelSegmentSolidItem */
/* loaded from: classes2.dex */
public class IllustAndMangaAndNovelSegmentSolidItem extends FlexibleItemAdapterSolidItem {
    private final int defaultSelectedIndex;
    private final SegmentedLayout.OnSelectSegmentListener segmentListener;
    private final int spanSize;

    public IllustAndMangaAndNovelSegmentSolidItem(SegmentedLayout.OnSelectSegmentListener onSelectSegmentListener, int i, int i2) {
        this.segmentListener = onSelectSegmentListener;
        this.defaultSelectedIndex = i;
        this.spanSize = i2;
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public int getSpanSize() {
        return this.spanSize;
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public SolidItemViewHolder onCreateViewHolder(ViewGroup viewGroup) {
        return IllustAndMangaAndNovelSegmentViewHolder.createViewHolder(viewGroup, this.segmentListener, this.defaultSelectedIndex);
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public boolean shouldBeInserted(int i, int i2, int i3, int i4) {
        return i3 == 0;
    }
}
